<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport"
    content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>信息采集</title>
  <link rel="stylesheet" type="text/css" href="__CSS__/api.css" />
  <link rel="stylesheet" type="text/css" href="__CSS__/aui.css" />
  <style>
    html,body{
      height: 100%;
    }
    body {
      background: #F6F6F6;
      background-image: linear-gradient(to bottom, #535557, #535557 160px, transparent 160px, transparent 100%);
      background-image: -webkit-linear-gradient(270deg, #535557, #535557 160px, transparent 160px, transparent 100%);
    }

    .aui-icon-tu {
      height: 2.2rem;
      width: 2.2rem;
      background: url(__IMG__/close.png) no-repeat 0.75rem center;
      background-size: 13px 13px;
    }

    .container {
      padding: 0.75rem;
      margin-top: 3rem;
      margin-bottom: 1rem;
    }

    .title {


      margin-bottom: 5px;
      font-size: 14px;
      color: #EE742B;
      line-height: 20px;
      position: relative;
      left: -8px;
    }

    .title span {
      position: absolute;
      left: -13px;
      top: 2px;
      width: 3px;
      height: 15px;
      background: #EE742B;
      border-radius: 0px 15px 15px 0px;
    }

    .box {
      background: #fff;
      padding: 0.7rem 1rem 7px;
      margin-bottom: 10px;
      border-radius: 10px;
    }

    .box1 {
      background: #fff;
      padding: 0 0.75rem;
      border-radius: 1px;

    }

    .inner {
      height: 2.5rem;
      align-items: center;
    }

    input[type="text"],
    input[type="tel"] {
      height: 2.5rem;
      margin-top: -1px;
      padding: 0;
      text-align: right;
      font-size: 0.8rem;
      color: #333;
      background: transparent;
    }

    input::-webkit-input-placeholder {
      font-size: 0.8rem;
      color: #AAAEB1;
    }

    .left_item {
      font-size: 0.8rem;
      color: #333;
    }

    .xing {
      color: #EE742B;
      font-size: 1rem;
      margin-right: 5px;
      margin-left: -0.35rem;
      font-weight: 500;
      line-height: 0.85rem;
      position: relative;
      top: 2px;
    }

    .arrow {
      width: 0.75rem;
      height: 0.75rem;
    }

    textarea {
      width: 100%;
      height: 3.5rem;
      padding: 0.45rem 0.6rem;
      background: #F6F6F7;
      border-radius: 1px;
      font-size: 0.8rem;
      color: #333;
      word-wrap: break-word;
      word-break: break-all;
      overflow-y: auto;
    }

    textarea::-webkit-input-placeholder {
      font-size: 0.8rem;
      color: #AAAEB1;
    }

    .btnBox {
      margin-top: 30px;
      width: 100%;
    }

    .btn {
      width: 100%;
      height: 2.5rem;
      line-height: 2.5rem;
      text-align: center;
      font-size: 0.8rem;
      color: #fff;
      /*position: fixed;*/
      /*bottom: 0;*/
      /*left: 0;*/
      background: #EE7B35;
      border-radius: 10px;
    }
  </style>
</head>

<body style="height: 100%;">

  <div class="container">
    <div class="box">
      <div class="title"><span></span> 学校选择</div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">学校</div>
        <!--<input type="text" placeholder="请选择" class="flex-con" readonly>-->
        <select id="school" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择学校</option>
          {volist name='school' id='s'}
          <option value="{$s.school}">{$s.school_name}</option>
          {/volist}
        </select>
        <img src="__IMG__/light_right.png" alt="" class="arrow">
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">入学年份</div>
        <select id="year" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择年份</option>
          {volist name='year' id='s'}
          <option value="{$s.year}">{$s.year}</option>
          {/volist}
        </select>
        <img src="__IMG__/light_right.png" alt="" class="arrow">
      </div>
      <div class="btnBox">
        <div class="btn" onclick="fnNext()" tapmode>下一步</div>
      </div>
      <br />
    </div>

  </div>
  {include file="public/footer" /}
</body>
<script type="text/javascript">
function fnNext() {
    var school = $('#school').val();
    var year = $('#year').val();
    if(school == '' || year == ''){
        alert('请选择学校和年份！');
        return;
    }else{
        $.ajax({
            url:'{:url("Index/nextCan")}',
            data: 'school='+school+'&year='+year, //
            type:'POST',
            dataType:'JSON',
            success: function(returndata){
                if(returndata.status == 200){
                    location.href = '{:url("Index/collect")}?school='+school+'&year='+year;
                }else{
                    alert(returndata.msg);
                    return;
                }
            },
            error:function () {
                alert('Ajax error!');
            }
        })
    }
}
</script>

</html>